﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace ServerManager.Models
{
    public class Server
    {
        public int Id { get; set; }

        [Display(Name ="品牌型号")]
        public string Brand { get; set; }

        [Display(Name = "CPU")]
        public string Cpu { get; set; }

        [Display(Name = "内存")]
        public string Memory { get; set; }

        [Display(Name = "硬盘")]
        public string HardDisk { get; set; }

        [Display(Name = "位置")]
        public string Position { get; set; }

        [Display(Name = "资产编号")]
        public string Code { get; set; }

        [Display(Name = "备注")]
        public string Remark { get; set; }

        [Display(Name = "创建时间")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 0 不可用 1 可用 2 被占用
        /// </summary>
        [Display(Name = "状态")]
        public byte Status { get; set; }

        [Display(Name = "IP地址")]
        public virtual ICollection<IpAddress> IpAddresses { get; set; }

        [Display(Name = "应用")]
        public virtual ICollection<App> Apps { get; set; }
    }
}
